#parse("admin/inc/goodsleft.html")
<script type="text/javascript"
	src="$thiscontextpath/ckeditor/ckeditor.js">
</script>
<script type="text/javascript"
	src="$thiscontextpath/ckfinder/ckfinder.js">
</script>
<div id="center-column">
	<div class="top-bar">
		<a href="new" class="button">增加 商品 </a>
		<h1>
			<strong>增加 商品</strong>
		</h1>
		<div class="breadcrumbs">
			<a href="#">Homepage</a> /
			<a href="#">Contents</a>
		</div>
	</div>
	<br />
	<div class="select-bar">
	</div>
	<div class="table">
		<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
		<img src="img/bg-th-right.gif" width="7" height="7" alt=""
			class="right" />
		<table class="listing form" cellpadding="0" cellspacing="0">
			<form name="editgoods" id="editgoods" method="post" action="../save">
				<input type="hidden" name="goodsId" value="${entity.goodsId}" />
				<tr>
					<th class="full" colspan="2">
						增加项
					</th>
				</tr>

				<tr>
					<td class="first"">
						<strong>商品名称</strong>
					</td>
					<td class="last">
						<INPUT type="text" class=text name=goodsName
							value="${entity.goodsName}">

					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>商品编号</strong>
					</td>
					<td class="last">
						<INPUT type="text" class=text name=goodsSn
							value="${entity.goodsSn}">

					</td>
				</tr>
				<tr>
					<td class="first" width="172">
						<strong>所属类目</strong>
					</td>
					<td class="last">
						<select style="width: 65%" name="categoryId">
							 
							 #if( $categorylist.size() > 0) #foreach ( $gcategory in ${categorylist})
							 	#if($!{entity.categoryId}==$!{gcategory.categoryID})							
							<option value='${gcategory.categoryID}' selected>
							${gcategory.categoryName}  
							</option>
							#else 
							<option value='${gcategory.categoryID}' >
							${gcategory.categoryName}  
							</option>
							#end
							
							#end #end
							
							
						</select>
					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>所属频道</strong>
					</td>
					<td class="last">
						<select style="width: 65%" name="channelId">
							 
							
							 #if( $channellist.size() > 0) #foreach ( $data in ${channellist})
							#if($!{entity.channelId}==$!{data.channelId})
							#set ($ifselect1 ="selected") 
							<option value='${data.channelId}' $!{ifselect1}>
							${data.channelTitle}
							</option>
							#else 
							<option value='${data.channelId}' >
							${data.channelTitle}
							</option>
							#end
							
							#end #end
							
							
						</select>
					</td>
				</tr>


				<tr>
					<td class="first"">
						<strong>商品品牌</strong>
					</td>
					<td class="last">
						<select style="width: 65%" name="brandId">
							 #if( $brandlist.size() > 0) #foreach ( $branddata in ${brandlist})
							 #if($!{entity.brandId}==$!{branddata.brandID})	
							<option value="${branddata.brandID}" selected >
								${branddata.brandName} 
							</option>
							#else 
							<option value='${branddata.brandID}' >
							${branddata.brandName} 
							</option>
							#end
							#end #end
						</select>

					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>商品类型</strong>
					</td>
					<td class="last">
						<select style="width: 65%" name="goodsType">
							<option value='1'>
								手机
							</option>
							<option value='2'>
								手机配件
							</option>
							<option value='3'>
								手机保险
							</option>
							<option value='4'>
								手机增值
							</option>
						</select>

					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>是否促销</strong>
					</td>
					<td class="last">


						#if($!{entity.isBest}==1) 
						#set ($ifselect1 ="checked") 
						#else 
						#set ($ifselect1 ="false") 
						#end 
						#if($!{entity.isNew}==1) 
						#set ($ifselect2 ="checked") 
						#else 
						#set ($ifselect2 ="false") 
						#end

						#if($!{entity.isHot}==1) 
						#set ($ifselect3 ="checked") 
						#else 
						#set ($ifselect3 ="false") 
						#end 
						#if($!{entity.isGroup}==1) 
						#set ($ifselect4 ="checked") 
						#else 
						#set ($ifselect4 ="false") 
						#end

						#if($!{entity.isOnSale}==1) 
						#set ($ifselect5 ="checked") 
						#else
						#set ($ifselect5 ="false") 
						#end 
						#if($!{entity.isPromote}==1) 
						#set ($ifselect6 ="checked") 
						#else #set ($ifselect6 ="false") 
						#end


						<input type="checkbox" name="isBest" value="1" $!{ifselect1} />
						精品
						<input type="checkbox" name="isNew" value="1" $!{ifselect2} />
						新品
						<input type="checkbox" name=isHot value="1" $!{ifselect3} />
						热销
						<input type="checkbox" name="isGroup" value="1" $!{ifselect4} />
						团购
						<input type="checkbox" name="isOnSale" value="1" $!{ifselect5} />
						上架
						<input type="checkbox" name="isPromote" value="1" $!{ifselect6} />
						促销

					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>市场价</strong>
					</td>
					<td class="last">
						<INPUT type="text" class=text name=marketPrice
							value="${entity.marketPrice}">

					</td>
				</tr>

				<tr>
					<td class="first"">
						<strong>团购价</strong>
					</td>
					<td class="last">
						<INPUT type="text" class=text name=groupPrice
							value="${entity.groupPrice}">

					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>商城价</strong>
					</td>
					<td class="last">
						<INPUT type="text" class=text name=shopPrice
							value="${entity.shopPrice}">

					</td>
				</tr>

				<tr>
					<td class="first"">
						<strong>库存告警数量</strong>
					</td>
					<td class="last">
						<INPUT type="text" class=text name=warnNumber
							value="${entity.warnNumber}">

					</td>
				</tr>
				<script type="text/javascript">

function BrowseServer(inputId) {
	var finder = new CKFinder();
	finder.basePath = '../ckfinder/'; //导入CKFinder的路径
	finder.selectActionFunction = SetFileField; //设置文件被选中时的函数
	finder.selectActionData = inputId; //接收地址的input ID
	finder.popup();
}

//文件选中时执行
function SetFileField(fileUrl, data) {
	document.getElementById(data["selectActionData"]).value = fileUrl;
}
</script>


				<tr>
					<td class="first"">
						<strong>缩略图片</strong>
					</td>
					<td class="last">
						<input id="goodsThumb" name="goodsThumb" type="text" size=30
							value="${entity.goodsThumb}" />
						<input type="button" value="浏览图片"
							onclick="BrowseServer( 'goodsThumb' );" />
						<img src="$thiscontextpath/${entity.goodsThumb}" width=50
							height=50 />


					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>商品图片</strong>
					</td>
					<td class="last">
						<input id="goodsImg" name="goodsImg" type="text" size=30
							value="${entity.goodsImg}" />
						<input type="button" value="浏览图片"
							onclick="BrowseServer( 'goodsImg' );" />
						<img src="$thiscontextpath/${entity.goodsImg}" width=50 height=50 />


					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>原始图片</strong>
					</td>
					<td class="last">
						<input id="originalImg" name="originalImg" type="text" size=30
							value="${entity.originalImg}" />
						<input type="button" value="浏览图片"
							onclick="BrowseServer( 'originalImg' );" />
						<img src="$thiscontextpath/${entity.originalImg}" width=50
							height=50 />


					</td>
				</tr>


				<tr>
					<td class="first"">
						<strong>商品简介</strong>
					</td>
					<td class="last">
						<textarea id="TextArea1" cols="75" rows="8" name="goodsBrief">$!{entity.goodsBrief}</textarea>

					</td>
				</tr>
				<tr>
					<td class="first"">
						<strong>商品描述</strong>
					</td>
					<td class="last">
						<textarea id="TextArea1" cols="15" rows="8" class="ckeditor"
							name="goodsDesc">$!{entity.goodsDesc}</textarea>

					</td>
				</tr>

				<tr>
					<td>
						<input type="submit" value="保 存" />
			</form>
			</td>
			</tr>
		</table>
		<p>


		</p>
	</div>
</div>
<div id="right-column">
	<strong class="h">INFO</strong>
	<div class="box">
		Detect and eliminate viruses and Trojan horses, even new and unknown
		ones. Detect and eliminate viruses and Trojan horses, even new and
	</div>
</div>
</div>
<div id="footer"></div>
</div>


</body>
</html>
